<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//用户端
Route::group([ 'prefix' => 'user'], function () {
    Route::post("login",'UserController@login');
    Route::post("register",'UserController@register');
    Route::middleware('auth:api')->group(function () {
        Route::delete('delete/{id}','UserController@destroy');
    });
});
Route::group([ 'prefix' => 'admin'], function () {
    Route::post("login",'AdminController@login');
    Route::post("register",'AdminController@register');
    Route::middleware('auth:api')->group(function () {
        Route::delete('delete/{id}','AdminController@destroy');
    });
});


